package com.lyf.scm.admin.domain.remote.purchase;

import com.lyf.scm.admin.domain.remote.purchase.dto.PlanPoInfoDTO;
import com.lyf.scm.admin.domain.remote.purchase.dto.PlanPoQueryDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 采购中心
 *
 * @author wangchlei
 * @date 2020/08/27
 */
@FeignClient(name = "scm-purchase-service")
public interface PurchaseRemote {
    /**
     * 查询sku在指定周期内的已接收量
     *
     * @param planPoQueryDTO
     * @return {@link Response<List<PlanPoInfoDTO>>}
     **/
    @PostMapping("/api/v1/plan/po/receivedQty")
    Response<List<PlanPoInfoDTO>> getReceivedQty(@RequestBody PlanPoQueryDTO planPoQueryDTO);


    /**
     * 采购预约量
     *
     * @param planPoQueryDTO 计划订单查询dto
     * @return {@link Response<List<PlanPoInfoDTO>>}
     */
    @PostMapping("/api/v1/plan/pa/appointmentQty")
    Response<List<PlanPoInfoDTO>> listAppointmentQty(@RequestBody PlanPoQueryDTO planPoQueryDTO);


    /**
     * 未履约采购量
     *
     * @param planPoQueryDTO 计划订单查询dto
     * @return {@link Response<List<PlanPoInfoDTO>>}
     */
    @PostMapping("/api/v1/plan/po/noAgreementQty")
    Response<List<PlanPoInfoDTO>> listNoAgreementQty(@RequestBody PlanPoQueryDTO planPoQueryDTO);
}
